<template>
  <div></div>
</template>

<script>
import { Toast } from 'vant'
window._toast = null
export default {
  name: '',
  data () {
    return {
      text: '请稍后',
      delay: 1000,
      showFlag: null
    }
  },
  mounted () {
  },
  methods: {
    showFunc () {
      window._toast = Toast.loading({
        duration: 0,
        // forbidClick: this.clickAble === 0 ? false : true,
        forbidClick: true,
        message: this.text,
      });
    },
    hideFunc () {
      window._toast.clear()
    }
  },
  components: {
  },
  watch: {
    showFlag (newVal, oldVal) {
      if (newVal) {
        this.showFunc()
      }
      if (!newVal) {
        this.hideFunc()
      }
    }
  }
}
</script>

<style lang="scss" scoped>
  
</style>
